<template>
  <div>
    <el-alert
      title="对公司名称、公司地址、营业执照、公司地区的更新，将使得公司资料被重新审核，请谨慎修改"
      type="info"
      show-icon
      :closable="false"
    />
    <el-form :model="companyForm" label-width="120px" style="margin-top:50px">
      <el-form-item label="公司名称">
        <el-input v-model="companyForm.name" disabled style="width:400px" />
      </el-form-item>

      <el-form-item label="公司地址">
        <el-input v-model="companyForm.companyAddress" disabled style="width:400px" />
      </el-form-item>

      <el-form-item label="邮箱">
        <el-input v-model="companyForm.mailbox" disabled style="width:400px" />
      </el-form-item>

      <el-form-item label="备注">
        <el-input v-model="companyForm.remarks" type="textarea" :rows="3" disabled style="width:400px" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { getCompanyInfo } from '@/api/setting'
export default {
  data() {
    return {
      companyForm: {
        name: '',
        companyAddress: '',
        mailbox: '',
        remarks: ''
      }
    }
  },

  created() {
    // console.log(this.$store.getters.companyId)
    this.getCompanyInfo()
  },

  methods: {
    async getCompanyInfo() {
      const { name, companyAddress, mailbox, remarks } = await getCompanyInfo(this.$store.getters.companyId)
      this.companyForm = { name, companyAddress, mailbox, remarks }
    }
  }
}
</script>

<style>

</style>
